Skip to content

Clone repo-memory branch before scheduling pre-step#23

Merged
mrjf merged 3 commits intomainfrom
copilot/fix-repo-memory-scheduling
Apr 4, 2026
Merged

Clone repo-memory branch before scheduling pre-step#23
mrjf merged 3 commits intomainfrom
copilot/fix-repo-memory-scheduling

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 4, 2026

The gh-aw compiler places the framework-managed repo-memory clone step after all user-defined pre-steps. This means the "Check which programs are due" scheduling script reads from an empty /tmp/gh-aw/repo-memory/autoloop directory, treating every program as a first run and producing incorrect selection/skip decisions.

Changes

  • workflows/autoloop.md: Added a new Clone repo-memory for scheduling pre-step before the scheduling step that performs an early shallow clone of the memory/autoloop branch. Gracefully handles first-run (no branch yet) by creating an empty directory.
  • tests/test_scheduling.py: Added TestWorkflowStepOrdering to assert the clone step exists and precedes the scheduling step, preventing future regressions.

Compiled workflow step order (before → after)

# Before:
1. Check which programs are due   ← reads /tmp/gh-aw/repo-memory/autoloop (empty!)
2. Clone repo-memory branch       ← too late

# After:
1. Clone repo-memory for scheduling  ← populates /tmp/gh-aw/repo-memory/autoloop
2. Check which programs are due      ← now sees persisted state
3. Clone repo-memory branch          ← framework-managed clone (for agent phase)

Copilot AI assigned Copilot and mrjf Apr 4, 2026
Copilot AI linked an issue Apr 4, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits April 4, 2026 04:45
The repo-memory clone step (from the tools: section) was placed after
the "Check which programs are due" pre-step by the gh-aw compiler,
so the scheduling script could not read persisted state from previous
runs. This caused incorrect selection/skip behavior.

Fix: add an explicit shallow clone of the memory/autoloop branch as
a new pre-step that runs before the scheduling step, ensuring state
files are available when scheduling decisions are made.

Also adds tests to verify the step ordering invariant.

Agent-Logs-Url: https://github.com/githubnext/autoloop/sessions/3013e45a-953d-4f06-bdab-ed720379b412

Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix repo-memory availability before scheduling step Clone repo-memory branch before scheduling pre-step Apr 4, 2026
Copilot AI requested a review from mrjf April 4, 2026 04:46
Copilot finished work on behalf of mrjf April 4, 2026 04:46
@mrjf mrjf marked this pull request as ready for review April 4, 2026 04:52
@mrjf mrjf merged commit 14dc2e2 into main Apr 4, 2026
13 of 15 checks passed
@mrjf mrjf deleted the copilot/fix-repo-memory-scheduling branch April 4, 2026 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

make repo-memory available before scheduling

2 participants